Skip to content

fix(logger): warn customers when the ALC log level is less verbose than log buffer #3834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

ConnorKirk
Copy link
Contributor

Summary

When the Advanced Logging Control is less verbose than the Logger Log buffer, buffered logs will not be visible. This PR adds a warning that is emitted when this scenario is detected.

There's an existing warning message if the ALC Log Level is less verbose than the Logger Log Level.

Changes

  • Emit a warning when ALC Log level is less verbose than buffer level
  • Add a test for this behaviour

Please provide a summary of what's being changed

Please add the issue number below, if no issue is present the PR might get blocked and not be reviewed

Issue number: #3821


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@boring-cyborg boring-cyborg bot added logger This item relates to the Logger Utility tests PRs that add or change tests labels Apr 15, 2025
@pull-request-size pull-request-size bot added the size/S PR between 10-29 LOC label Apr 15, 2025
@ConnorKirk ConnorKirk marked this pull request as draft April 15, 2025 10:27
@ConnorKirk ConnorKirk force-pushed the fix/3821-emit-warning-when-alc-conflicts-with-log-buffer branch from ec492b3 to a399be4 Compare April 15, 2025 11:01
@pull-request-size pull-request-size bot added size/M PR between 30-99 LOC and removed size/S PR between 10-29 LOC labels Apr 15, 2025
@leandrodamascena
Copy link
Contributor

I know this PR is in draft stage, but please do not merge it before we have further discussion in issue #3821. I hope to write new comments by tomorrow.

@ConnorKirk ConnorKirk marked this pull request as ready for review April 15, 2025 12:29
@dreamorosi dreamorosi changed the title fix(logger): Output a warning when the ALC log level is less verbose than log buffer fix(logger): warn customers when the ALC log level is less verbose than log buffer Apr 15, 2025
@dreamorosi
Copy link
Contributor

I had a chat with @leandrodamascena and we agreed that we should add another log warning when we flush the buffer that says something along the lines of (feel free to reword it):

'Advanced Loggging Controls (ALC) Log Level is less verbose than Log Buffering Log Level. Some logs might be missing.'

Longer-ish explanation as for why is in the linked issue.

@github-actions github-actions bot added the bug Something isn't working label Apr 15, 2025
@ConnorKirk ConnorKirk force-pushed the fix/3821-emit-warning-when-alc-conflicts-with-log-buffer branch from f9d2fb5 to c2a0e98 Compare April 16, 2025 12:39
@dreamorosi dreamorosi self-requested a review April 16, 2025 17:57
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR!

@dreamorosi dreamorosi merged commit 04f64ce into aws-powertools:main Apr 16, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working logger This item relates to the Logger Utility size/M PR between 30-99 LOC tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Log warning message if Advanced Logging Controls log level is less verbose than Logger level
3 participants